import 'package:example/generated/json/base/json_field.dart';
import 'package:example/generated/json/todo_entity.g.dart';
import 'dart:convert';
export 'package:example/generated/json/todo_entity.g.dart';

@JsonSerializable()
class TodoEntity {
	int? completeDate = 0;
	String? completeDateStr = '';
	String? content = '';
	int? date = 0;
	String? dateStr = '';
	int? id = 0;
	// 优先级  0: 默认  1: 紧急
	int? priority = 0;
	// 0: 未完成  1: 已完成
	int? status = 0;
	String? title = '';
	// 类型 0: 默认
	int? type = 0;
	int? userId = 0;

	TodoEntity();

	factory TodoEntity.fromJson(Map<String, dynamic> json) => $TodoEntityFromJson(json);

	Map<String, dynamic> toJson() => $TodoEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}